<template>
  <div class="hello">
    <h1>{{ msg }}</h1>
    <!--生成微信登录二维码-->
    <div id="weixin"></div>
  </div>
</template>
 
<script>
import wx from "../../static/wxLogin";
export default {
  name: "HelloWorld",
  data() {
    return {
      msg: "微信扫码",
      wxImg: "",
    };
  },
  mounted() {
    // 生成微信二维码，工具类，不是我提供，从腾讯下载的
    var obj = new WxLogin({
      id: "weixin",
      appid: "wx7287a60bb700fd21",
      scope: "snsapi_login",
      redirect_uri: "http://www.txjava.cn/wxCallback",
    });
  },
  methods: {},
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1,
h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
